﻿using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace StableDiffusionTools.Utils
{
    public class ExtendedPathInfo
    {
        public PathInfo PathInfo { get; private set; }

        public ExtendedPathInfo(string path)
        {
            PathInfo = GetPathInfo(path);
        }

        public static PathInfo GetPathInfo(string path)
        {
            PathInfo Result = PathInfo.NotFound;
            if (!string.IsNullOrEmpty(path))
            {
                if (File.Exists(path)) Result = PathInfo.File;
                else if (Directory.Exists(path)) Result = PathInfo.Directory;
            }
            return Result;
        }
    }
}
